/**
 * Created with IntelliJ IDEA.
 * User: ajhin
 * Date: 3/9/14
 * Time: 2:28 PM
 * To change this template use File | Settings | File Templates.
 */
package com.societyGames.sortEngine
{
import flash.display.Sprite;

public class SortItem extends Sprite
{
  private var _zSort:Number; //How close or far from the camera. Higher is closer to camera.
  public var sortScene:SortScene;
  public var index:int = -1;

  public function set zSort(value:Number):void
  {
    if (this._zSort != value)
    {
      this._zSort = value;
      if (sortScene != null)
      {
        sortScene.updateSort(this);
      }
    }
  }

  public function get zSort():Number
  {
    return _zSort;
  }
}
}
